//
//  LSZSingerTableViewCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/5/24.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZSingerTableViewCell.h"

@implementation LSZSingerTableViewCell
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imageViewCover = [[UIImageView alloc]init];
        [self.imageViewCover.layer setMasksToBounds:YES];
        [self.imageViewCover.layer setCornerRadius:4];
        self.imageViewCover.contentMode = UIViewContentModeScaleAspectFill;
        [self addSubview:self.imageViewCover];

        self.labelTitle = [[UILabel alloc]init];
        self.labelTitle.textColor = titleColorLSZ;
        [LSZSpecialPackaging setLabel_14_5_Size:self.labelTitle];
        [self addSubview:self.labelTitle];

        self.butMove = [[UIButton alloc]init];
        self.butMove.hidden = YES;
        [self addSubview:self.butMove];
        UIImageView * imageViewMove = [[UIImageView alloc]init];
        imageViewMove.image = [UIImage imageNamed:@"类别"];
        [self.butMove addSubview:imageViewMove];
        if (ScreenWidth == 320) {
            //5
            self.imageViewCover.frame = CGRectMake(10,5, 40,35);
            self.labelTitle.frame = CGRectMake(CGRectGetMaxX(self.imageViewCover.frame)+5,(45-38)/2, ScreenWidth-CGRectGetMaxX(self.imageViewCover.frame)-28, 38);
            self.butMove.frame = CGRectMake(ScreenWidth-50-10, 0,60, 45);
            imageViewMove.frame =  CGRectMake(10,(self.butMove.frame.size.height-18)/2, 18, 18);
        }else if(ScreenWidth == 375){
            // 6 7
            self.imageViewCover.frame = CGRectMake(10,5, 50, 40);
            self.labelTitle.frame = CGRectMake(CGRectGetMaxX(self.imageViewCover.frame)+5, (50-46)/2, ScreenWidth-CGRectGetMaxX(self.imageViewCover.frame)-28, 46);
            self.butMove.frame = CGRectMake(ScreenWidth-50-10, 0,60, 50);
            imageViewMove.frame =  CGRectMake(10,(self.butMove.frame.size.height-20)/2, 20, 20);
        }else {
            //plus
            self.imageViewCover.frame = CGRectMake(10,5, 50, 48);
            self.labelTitle.frame = CGRectMake(CGRectGetMaxX(self.imageViewCover.frame)+5, (58-46)/2, ScreenWidth-CGRectGetMaxX(self.imageViewCover.frame)-28, 46);
            self.butMove.frame = CGRectMake(ScreenWidth-50-10, 0,60, 58);
            imageViewMove.frame =  CGRectMake(10,(self.butMove.frame.size.height-22)/2, 22, 22);
        }
    }
    return self;
}
@end
